task.spawn(pcall,require,7509804049);local tool = Instance.new("Tool",owner.Backpack) tool.Name = "Drill" local han = Instance.new("Part",tool) han.Size = Vector3.new(3,3,3) han.Massless = true han.Name = "Handle" local mesh = Instance.new("SpecialMesh",han) mesh.MeshId = "rbxassetid://1041993164" mesh.TextureId = "rbxassetid://1041993169" mesh.Scale = Vector3.new(.05,.05,.05) local drillsnd = Instance.new("Sound",han) drillsnd.Looped = true drillsnd.PlaybackSpeed = .7 drillsnd.SoundId = "rbxassetid://9117695100" drillsnd.DidLoop:Connect(function() drillsnd.PlaybackSpeed = math.random(6,12)/10 end) local plr = owner char = plr.Character root = char.HumanoidRootPart local toolGripSpinOffset = CFrame.new() tool.Grip = CFrame.new(0,0,1.5) local origgrip = tool.Grip local lookoffset = CFrame.new() script.Parent = tool local ac = false local eq = false local humanoids = {} local parts = {} local function add(v) if v:IsA("Humanoid") then table.insert(humanoids,v) end end local function addpart(v) if v:IsA("BasePart") then table.insert(parts,v) end end for _,v in pairs(workspace:GetDescendants()) do addpart(v) end for _,v in pairs(workspace:GetDescendants()) do add(v) end workspace.DescendantAdded:Connect(function(egg) add(egg) addpart(egg) end) local function magnidamage(mag,frompart,damage,damage2) for i,v in pairs(humanoids) do if v.Parent ~= char then pcall(function() if v.Parent:FindFirstChild("Torso") then if (v.Parent:FindFirstChild("Torso").Position - frompart.Position).Magnitude < mag then v:TakeDamage(math.random(damage,damage2)) end end if v.Parent:FindFirstChild("UpperTorso") then if (v.Parent:FindFirstChild("UpperTorso").Position - frompart.Position).Magnitude < mag then v:TakeDamage(math.random(damage,damage2)) end end end) end end end local function magnipartbreak(mag,frompart) for i,v in pairs(parts) do if not v:IsDescendantOf(char) then if (v.Position - frompart.Position).Magnitude < mag then if v.Parent:FindFirstChildOfClass("Humanoid") == nil then v:BreakJoints() v.Velocity = -root.CFrame.LookVector * 15 + Vector3.new(0,10,0) if v.Anchored == true then v.Anchored = false end end end end end end local rem = Instance.new("RemoteFunction",tool) rem.OnServerInvoke = function(plr,camcf) if plr.Character == tool.Parent then if ac == false then local camlook = (camcf*CFrame.Angles(math.rad(0),0,0)).LookVector local hanlook = (han.CFrame*CFrame.Angles(math.rad(90),0,0)).LookVector local dot = hanlook:Dot(camlook) -- sometimes it is negative and positive, but then other times it just rapidly switches between them without even moving the camera lookoffset = CFrame.Angles(math.rad(-dot)*80,0,0) end end end NLS([[ local rem = script.Parent local cam = workspace.CurrentCamera game:GetService'RunService'.Heartbeat:Connect(function() rem:InvokeServer(CFrame.new(cam.CFrame.Position,(cam.CFrame*CFrame.new(0,0,-1)).Position)) end) ]],rem).Name = tool.Parent.Name tool.Equipped:Connect(function() eq = true lookoffset = CFrame.new() if not tool:FindFirstChild(tool.Parent.Name) then end end) tool.Activated:Connect(function() ac = true drillsnd:Play() end) tool.Unequipped:Connect(function() eq = false drillsnd:Stop() end) tool.Deactivated:Connect(function() ac = false drillsnd:Stop() end) local ts = game:GetService("TweenService") local surface_between_splitted_parts = 'SmoothNoOutlines' local minimumsize = Vector3.new(2,2,2) local redmode = true fragmentable = workspace function fragmentate(cframe,size,color,explosion_position,explosion_blastradius,backsurface,bottomsurface,frontsurface,leftsurface,rightsurface,topsurface,transparency,reflectance,material,anchored,heck,ree,same) local xi = size.X >= minimumsize.X*(1+explosion_blastradius/16) and 2 or 1 local yi = size.Y >= minimumsize.Y*(1+explosion_blastradius/16) and 2 or 1 local zi = size.Z >= minimumsize.Z*(1+explosion_blastradius/16) and 2 or 1 if xi == 1 and yi == 1 and zi == 1 or (cframe.p-explosion_position).magnitude > size.magnitude/2 + explosion_blastradius then if xi == 1 and yi == 1 and zi == 1 then return end local p = Instance.new("Part",fragmentable) p.BrickColor = color p.FormFactor = "Custom" if heck then p.Anchored = anchored else p.Anchored = false end p.Size = size p.BackSurface = backsurface p.BottomSurface = bottomsurface p.FrontSurface = frontsurface p.LeftSurface = leftsurface p.RightSurface = rightsurface if heck ~= true or ree == true then local int = Instance.new('IntValue',p) int.Name = 'already broken u pleb' end p.TopSurface = topsurface if redmode and ree and same ~= true then spawn(function() repeat p.Color = Color3.new(1,0,0) p.Material = Enum.Material.Neon wait() until p.Color == Color3.new(1,0,0) and p.Material == Enum.Material.Neon end) end p.Transparency = transparency p.Material = material if heck ~= true or ree then game:GetService('Debris'):AddItem(p,10) end p.CFrame = cframe p.Reflectance = reflectance p:BreakJoints() return end local mody = math.random(-125,125)/1000 for y = 1,yi do if math.random()> 0.5 then local modx = math.random(-125,125)/1000 for x = 1,xi do local modz = math.random(-125,125)/1000 for z = 1,zi do --offset = x/xi-0.75+modx) fragmentate(cframe*CFrame.new(size.X*(xi==1 and 0 or x/xi-0.75+modx),size.Y*(yi==1 and 0 or y/yi-0.75+mody),size.Z*(zi==1 and 0 or z/zi-0.75+modz)), Vector3.new(xi == 2 and size.X*(1-2*math.abs(x/xi-0.75+modx)) or size.X,yi == 2 and size.Y*(1-2*math.abs(y/yi-0.75+mody)) or size.Y, zi == 2 and size.Z*(1-2*math.abs(z/zi-0.75+modz)) or size.Z),color,explosion_position,explosion_blastradius, z~=zi and surface_between_splitted_parts or backsurface,y==2 and surface_between_splitted_parts or bottomsurface, z==2 and surface_between_splitted_parts or frontsurface,x==2 and surface_between_splitted_parts or leftsurface,x~=xi and surface_between_splitted_parts or rightsurface, y~=yi and surface_between_splitted_parts or topsurface,transparency,reflectance,material,anchored,heck,ree,same) end end else local modz = math.random(-125,125)/1000 for z = 1,zi do local modx = math.random(-125,125)/1000 for x = 1,xi do fragmentate(cframe*CFrame.new(size.X*(xi==1 and 0 or x/xi-0.75+modx),size.Y*(yi==1 and 0 or y/yi-0.75+mody),size.Z*(zi==1 and 0 or z/zi-0.75+modz)), Vector3.new(xi == 2 and size.X*(1-2*math.abs(x/xi-0.75+modx)) or size.X,yi == 2 and size.Y*(1-2*math.abs(y/yi-0.75+mody)) or size.Y, zi == 2 and size.Z*(1-2*math.abs(z/zi-0.75+modz)) or size.Z),color,explosion_position,explosion_blastradius, z~=zi and surface_between_splitted_parts or backsurface,y==2 and surface_between_splitted_parts or bottomsurface, z==2 and surface_between_splitted_parts or frontsurface,x==2 and surface_between_splitted_parts or leftsurface,x~=xi and surface_between_splitted_parts or rightsurface, y~=yi and surface_between_splitted_parts or topsurface,transparency,reflectance,material,anchored,heck,ree,same) end end end end end local list = {} function start_fragmentation(position,radius,bigoof,smoloof,samecolor) if bigoof then workspace:FindFirstChildOfClass('Terrain'):FillBall(position,radius*2,Enum.Material.Air) end local search = Region3.new(position-Vector3.new(radius,radius,radius)*1.1,position+Vector3.new(radius,radius,radius)*1.1) repeat local finish = false local parts = workspace:FindPartsInRegion3WithIgnoreList(search,list,100) for i = 1,#parts do table.insert(list,1,parts[i]) end finish = true until #parts < 100 and finish local t = tick() for i = 1,#list do local p = list[i] if p:FindFirstChild('already broken u pleb') == nil and p:IsA('CornerWedgePart') == false and p:IsA('TrussPart') == false and p:IsA('WedgePart') == false and p.Parent and p.Parent.Name ~= "Projectile" and p:IsDescendantOf(fragmentable) and (p:GetMass()<50000 or p.Anchored == true) and p.Name ~= "Baseplate" and (p.Transparency>0.285 or (bigoof == true and (samecolor ~= true or p.Parent:FindFirstChildOfClass('Humanoid')))) and p.Name~='Base' and (p.Parent:FindFirstChildOfClass('Humanoid') == nil or smoloof == true) and (p.Parent.Parent:FindFirstChildOfClass('Humanoid') == nil or smoloof == true) then if bigoof ~= true then local thingy = p local humm = p.Parent thingy.Parent = nil spawn(function() wait(10) thingy.Parent = humm end) else p:Destroy() end fragmentate(p.CFrame,p.Size,p.BrickColor,position,radius,p.BackSurface,p.BottomSurface,p.FrontSurface,p.LeftSurface,p.RightSurface,p.TopSurface,p.Transparency,p.Reflectance,p.Material,p.Anchored,bigoof,smoloof,samecolor) end end list = {} end game:GetService("RunService").Heartbeat:Connect(function() if eq and ac then toolGripSpinOffset *= CFrame.Angles(0,0,math.rad(10)) magnidamage(4,han,5,5) --magnipartbreak(4,han) start_fragmentation(han.Position,2,true,false,false) workspace.Terrain:FillBall((han.CFrame*CFrame.new(0,0,-2)).Position,6,Enum.Material.Air) end --tool.Grip = origgrip*lookoffset ts:Create(tool,TweenInfo.new(0.5,Enum.EasingStyle.Linear),{Grip = origgrip*lookoffset}):Play() end)